package com.engineering.elink.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.engineering.elink.co.CoinCo;
import com.engineering.elink.common.PaginationTwo;
import com.engineering.elink.dao.CoinMapper;
import com.engineering.elink.service.CoinService;

@Service
public class CoinServiceImpl implements CoinService{

	@Autowired
	private CoinMapper coinMapper;
	
	@Override
	public Map<String, Object> getCoinList(CoinCo coinCo) {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("list", coinMapper.selectListByUserId(coinCo));
		map.put("Pagination",new PaginationTwo(coinCo, coinMapper.selectListCountByUserId(coinCo)));
		return map;
	}

}
